
#ifndef VECTOR_H_
#define VECTOR_H_

#include <string>
#include <sstream>
#include <cmath>
#include "../interface/ToStringAble.h"
#include "../ads/typesDefinition.h"
using namespace std;
namespace common {

class Vector: public ToStringAble {
protected:
	skreal x;
	skreal y;
public:

	Vector();
	Vector(skreal x,skreal y);
	Vector(const Vector& vector);
    skreal getX() const;
    skreal getY() const;
    void setX(skreal x);
    void setY(skreal y);
    Vector operator+(const Vector& vec);
    Vector operator-(const Vector& vec);
    // iloczyn skalarny
    skreal operator*(const Vector& vec);
    Vector operator*(const skreal& d);
    // iloczyn wektorowy
    skreal operator^(const Vector& vec);
    skreal length() const;
    // wektor jednostkowy
    Vector unit();

    std::string toString(void);

    friend std::istream& operator>>( std::istream& is, Vector &vec);
	virtual ~Vector();

};

/**
 * Konwersion from my simple Vector to ublasVecto
 *
 */
ublasVector& operator<<(ublasVector& vec , const Vector& v);

}

#endif /* VECTOR_H_ */
